[KeyVault] - Migrate KeyVault Certificates, Keys and Secrets to Core V2#21702
[KeyVault] - Migrate KeyVault Certificates, Keys and Secrets to Core V2#21702timovv merged 89 commits intoAzure:mainfrom
Conversation
|
I have updated the PR description with the latest changes |
| @@ -260,32 +260,34 @@ export interface ErrorModel { | |||
| readonly message?: string; | |||
| } | |||
|
|
|||
| export { ExtendedCommonClientOptions } | |||
There was a problem hiding this comment.
I'm not sure, the only place where this is being exported is in index.ts on line 197.
CommonClientOptions from Core-http was also being exported there, I just renamed it to the equivalent in CoreV2.
There was a problem hiding this comment.
This change is breaking then but I wonder what was the point of re-exporting the old interface in the first place. I am thinking of biting the bullet and removing the re-export even though that is also a breaking change. @xirzec what do you think?
There was a problem hiding this comment.
For the record, PipelineOptions from core-http (which has been removed in this PR) was being exported too in the same way as ExtendedCommonClientOptions.
You can find it here:
https://github.com/JonathanCrd/azure-sdk-for-js/blob/main/sdk/keyvault/keyvault-certificates/review/keyvault-certificates.api.md?plain=1#L433
I'm also curious why this behavior, however, wouldn't it be a breaking change anyway since PipelineOptions is no longer being exported?
There was a problem hiding this comment.
I would like to get this PR merged in the coming days, but want to resolve this first. I did a bit of digging to try and understand the impact of the change. PipelineOptions was initially exported in this commit from 3 years back and hasn't been touched since. At the time of that commit, the CertificateClient constructor took PipelineOptions as a parameter, so you can see why the export was required then. This was extracted out to a CertificateClientOptions by Daniel here, which is what we have now.
I don't see the point in exporting the new ExtendedCommonClientOptions as is here -- let's remove that at least. If we were to remove the export of PipelineOptions, would we still be able to release this as a minor? I can think of some hackery that might be less breaking (re-exporting ExtendedCommonClientOptions as PipelineOptions...) but that doesn't sit very well with me since we're effectively giving the type an incorrect name.
Thoughts, @deyaaeldeen, @xirzec, @joheredi (and anybody else)?
There was a problem hiding this comment.
To wrap this up: After an offline discussion, we're in agreement it would be ok to remove the export of PipelineOptions and still release this as a minor.
Packages impacted by this PR
Issues associated with this PR
Describe the problem that is addressed by this PR
This PR finishing updating all of KeyVault to use CoreV2 and removes all their dependencies to the old core. For more information about this type of migrations refer to this wiki.
Since these 3 packages depends on common, they needed to be migrated at the same time. The following is a summary of the main changes:
Dependencies and generation changes:
core-httpand replaced them with theircore-client,core-rest-pipelineandcore-authequivalent.isNodeanddelayare now imported fromcore-utilspreview, since Admin client already depends on it.core-http-compatas a dependency to useExtendedCommonClientOptionsin all packages instead ofCommonClientOptionsfromcore-client.Authentication changes:
SigningPolicfrom all packages.bearerTokenAuthenticationPolicyto authenticate.isTokenCredentialfrom imports.constants.tsparsedChallenge.resource.Convenience layer changes:
Nextkeyword in them. For example:getDeletedSecret(continuationToken, options )togetDeletedSecretNext(vaultURI, continuationToken, options).Test changes:
Recorder updates:
All of the packages build correctly, and tests pass as well.
Related PRs
Checklists